package com.MySpringiocxml.ditest;

import java.util.Arrays;

//员工类
public class Emp {
    private String ename;
    private Integer age;
    private String[] hobbies;

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    //员工属于某个部门
    private Dept dept;

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }


    public void work(){
        System.out.println("员工"+ename+"在工作"+age+"岁");
        dept.info();
        System.out.println(Arrays.toString(hobbies));
    }
}
